package com.idea.encryption;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.widget.ImageView;

public class MainActivity extends AppCompatActivity {


    private ImageView iv;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        iv = (ImageView) findViewById(R.id.iv);



//        /storage/emulated/0/UF/Uploads/Ad/20170213111849830.png
        Bitmap bitmap =  BitmapFactory.decodeFile("/storage/emulated/0/UF/Uploads/Ad/20170213111849830.png");

        if (bitmap!=null){

            iv.setImageDrawable(new BitmapDrawable(bitmap));

            Log.i("bitmap","bitmap!=null");
        }else {
            Log.i("bitmap","bitmap==null");
        }


    }


}
